package com.cqc.jdk8.Jutil;

import org.junit.Test;

import java.util.Random;

public class RandomTest {

    /**
     * 生成在min~max之间的随机数
     */
    @Test
    public void f1(){
        int min = 10000000;
        int max = 99999999;
        Random random = new Random();
        for (int i = 0; i < 100; i++) {
            int r = random.nextInt(max) % (max - min + 1) + min;
            System.out.println(r);
        }
    }
}
